﻿@model IEnumerable<DLM.Domain.DTO.PartyDTO>
@using Webdiyer.WebControls.Mvc;
@{
    ViewBag.Title = "都来米-活动搜索";
    Layout = "~/Views/Shared/_Master.cshtml";
}
<div class="main">
    <div class="main_tab_2">
        <div class="main_tab_2_up">
            <ul>
                <li class="current"><a href="#">搜索结果</a></li>
            </ul>
        </div>
        <div class="main_tab_2_down">
            <div class="box">
                <h3>
                    查询结果<a>共
                        @{ int count = 0; if (Model != null) { count = Model.Count(); }}
                        @count 条</a></h3>
                <div class="tr clearfix">
                    <ul class="search_result meet clearfix">
                        @if (Model != null)
                        {
                            foreach (var item in Model)
                            {
                            <li>
                                <div class="pic">
                                    @if (item.PublisherPhoto == "none_75_75.png")
                                    {
                                        <img src="@Url.Content("~/Content/ad/none_75_75.png")" alt="头像" height="90px" width="77px"/>
                                    }
                                    else
                                    { 
                                        <img width="77px" height="90px" src="@Url.Content("~/Files/Photos/" + item.UserID + "/" + item.PublisherPhoto)" alt="user pic" />
                                    }
                                </div>
                                <div class="info">
                                    <h4>
                                        主题：
                                        @item.Subject
                                    </h4>
                                    <p>
                                        活动时间：
                                        @item.PartyDate.Value.ToShortDateString()</p>
                                    <p>
                                        地点：
                                        @item.Location</p>
                                </div>
                                <div class="action">
                                    <a href="@Url.Action("View", "Party", new { id = item.PartyID })" class="add_friend">
                                        我要参加</a>
                                </div>
                            </li>
                            }
                        }
                    </ul>
                    <div class="paging">
                    @Html.Pager(Model as PagedList<DLM.Domain.DTO.PartyDTO>, new PagerOptions
           {
               PageIndexParameterName = "pageIndex",
               CurrentPagerItemWrapperFormatString = "<span class=\"current\">{0}</span>",
               //NumericPagerItemWrapperFormatString = "<a>{0}</a>",
               PrevPageText = "<",
               NextPageText = ">",
               ShowNumericPagerItems = true,
               ShowFirstLast = false,
               ShowPrevNext = true,
               CssClass = "scott",
               MorePageText = "...",
               SeparatorHtml = ""
           })
           </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--main-end-->
